<div id="header">
	<div id="menu">
		
		<?php
            function get_current_page_name() {
                return substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"],"/") + 1);
            }
            $current_url  = get_current_page_name();
            $current_menu = "class=\"current_page_item\"";
            $all_url = array("index.php", 
                             "installation.php", 
				             "test_execution.php",
							 "test_report.php");
			if (isset($_SESSION['uid']) && $_SESSION['uid'] == 'admin') {
			    $all_url[] = "administration.php";
			}
				           
            $all_menu = array("Home",
                              "NA/SART Installation",
				              "Test Execution",
							  "Test Report");
			if (isset($_SESSION['uid']) && $_SESSION['uid'] == 'admin') {
			    $all_menu[] = "Administration";
			}
			
			/*
            for ($i = 0; $i <= sizeof($all_url) - 1; $i++) {
			    if (!isset($_SESSION['uid']) && $all_menu[$i] !== "Home") {
				    $link = "#";
				}
				else {
				    $link = $all_url[$i];
				}
			    if ($current_url == $all_url[$i])
				    echo "<li " . $current_menu . "><a href='" . $link . "'>" . $all_menu[$i] . "</a></li>";
                else
                    echo "<li><a href='" . $link . "'>" . $all_menu[$i] . "</a></li>";
            }
            */
				     ?>
      
<ul id="nav">
	<li class="current"><a href="index.php">Home</a></li>
	<li><a href="#">Test Machine</a>
		<ul>
			<li><a href="#">Monitoring</a></li>
			<li><a href="reservation.php">Reservation</a></li>
		</ul>
	</li>
	<li><a href="#">Test Traffic</a>
		<ul>
			<li><a href="#">Find Traffic</a></li>
			<li><a href="#">Tag Traffic</a></li>
		</ul>
	</li>
	<li><a href="#">Test Control</a>
		<ul>
			<li><a href="#">SW Installation</a>
				<ul>
					<li><a href="#">Sub-Level Item</a></li>
					<li><a href="#">Sub-Level Item</a>
						<ul>
							<li><a href="#">Sub-Level Item</a></li>
							<li><a href="#">Sub-Level Item</a></li>
							<li><a href="#">Sub-Level Item</a></li>
						</ul>
					</li>
					
					<li><a href="#">Sub-Level Item</a></li>
				</ul>
			</li>
		</ul>
	</li>	
	<li><a href="#">Administration</a>
				<ul>
					<li><a href="#">Test Machine Maitenance</a></li>
					<li><a href="#">User Management</a></li>
				</ul>
			</li>
	<li><a href="#">About</a></li>
</ul>  
  
	</div>
</div>